PDFLATEX = pdflatex -file-line-error -halt-on-error
BIBTEX  = bibtex
OUT = GLSVLSI13_submission.pdf journal.pdf

BIB     = $(wildcard *.bib)

all: $(OUT)

clean:
	rm -f *~ *.out *.toc *.aux *.dvi *.log *.nav *.snm *.bbl *.blg *.idx $(OUT)
	rm -f *.backup

%.pdf : %.tex
	$(PDFLATEX) $<
	$(BIBTEX) $(patsubst %.tex, %.aux, $<)
	$(PDFLATEX) $<
	$(PDFLATEX) $<
